package com.calvin.study.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import cloud.alibaba.study.entity.seckill.SeckillAct;

@Repository
public interface SeckillActMapper extends BaseMapper<SeckillAct> {
	
	@Select({"<script>" ,
				"UPDATE t_seckill_act SET status = 1  WHERE seckill_act_id in",
				"<foreach collection='seckillActIds' item='item' index='index' open='(' close=')' separator=','>",
					" #{item}",
				"</foreach> ",
			 "</script>"
	})
	public void batchUpdateStatus(List<Long> seckillActIds);

}
